package com.jiawa.wiki.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("ping")
public class PingController {

    @Value("${test.hello:defaultHello}")
    private String testHello;

    @GetMapping
    public Map<String,String> ping(){
        Map<String ,String> map= new HashMap<>();
        map.put("msg",testHello);
        return map;
    }
}
